alertnote "Can't find the folder for the home page [lindex $tmp_hp 1][lindex $tmp_hp 2]"
set tmp_notfind "[lindex $tmp_hp 1][lindex $tmp_hp 2]"
}
}
if {$tmp_notfind != ""} {htmlHomePages $tmp_notfind}
catch {unset tmp tmp_notfind tmp_hp}
# Define a couple of key bindings.
if {[file exists "$PREFS:HTML:HTML entity keys"]} {
source "$PREFS:HTML:HTML entity keys"
} else {
if {![info exists htmlEntityKeys([list less than])]} {
set htmlEntityKeys([list less than]) "<U<B<I/,"
set htmlEntityKeysProc([list less than]) {htmlInsertCharacter "less than"}
}
if {![info exists htmlEntityKeys([list greater than])]} {
set htmlEntityKeys([list greater than]) "<U<B<I/."
set htmlEntityKeysProc([list greater than]) {htmlInsertCharacter "greater than"}
}
if {![info exists htmlEntityKeys(ampersand)]} {
set htmlEntityKeys(ampersand) "<U<B<I/7"
set htmlEntityKeysProc(ampersand) {htmlInsertCharacter ampersand}
}
if {![info exists htmlEntityKeys([list nonbreak space])]} {
set htmlEntityKeys([list nonbreak space]) "<U<B<I/ "
set htmlEntityKeysProc([list nonbreak space]) {htmlInsertCharacter "nonbreak space"}
}
htmlSaveCache "HTML entity keys" "array set htmlEntityKeys [list [array get htmlEntityKeys]]\rarray set htmlEntityKeysProc [list [array get htmlEntityKeysProc]]"
}
bind::fromArray htmlEntityKeys htmlEntityKeysProc 0 HTML
catch {unset htmlEntityKeys htmlEntityKeysProc}
proc htmlBindBraces {args} {
global bind::LeftBrace bind::RightBrace
eval bind [keys::toBind ${bind::LeftBrace}] htmlLeftBrace HTML
eval bind [keys::toBind ${bind::RightBrace}] htmlRightBrace HTML
}
htmlBindBraces
trace variable bind::LeftBrace w htmlBindBraces
trace variable bind::RightBrace w htmlBindBraces
# Comment line
bind 'l' <C> htmlCommentLine HTML
# Register hooks
hook::register saveHook htmlUpdateLastMod HTML
hook::register saveasHook htmlUpdateLastMod HTML
hook::register quitHook htmlQuitHook
hook::register closeHook htmlCloseHook Home
hook::register deactivateHook htmldeactivateHook Home
hook::register activateHook htmlActivateHook HTML
hook::register openHook htmlActivateHook HTML
proc HTML::OptionTitlebar {} {
global htmlPopUptag
return [set htmlPopUptag [htmlGetAttributes]]
}
proc HTML::OptionTitlebarSelect {item} {
global htmlPopUptag
if {[lsearch -exact $htmlPopUptag $item] >= 0} {
htmlInsertAttributes $item
} else {
error "Not an attibute."
}
}
if {![alpha::package vsatisfies ${alpha::version} 7.1b1]} {
proc htmlLeftBrace {} {
global elecLBrace
set old $elecLBrace
if {![htmlIsInContainer SCRIPT] && ![htmlIsInContainer STYLE]} {
set elecLBrace 0
}
catch {bind::LeftBrace}
set elecLBrace $old
}
proc htmlRightBrace {} {
global elecRBrace
set old $elecRBrace
if {![htmlIsInContainer SCRIPT] && ![htmlIsInContainer STYLE]} {
set elecRBrace 0
}
catch {bind::RightBrace}
set elecRBrace $old
}
} else {
proc htmlLeftBrace {} {
global electricBraces
set old $electricBraces
if {![htmlIsInContainer SCRIPT] && ![htmlIsInContainer STYLE]} {
set electricBraces 0
}
catch {bind::LeftBrace}
set electricBraces $old
}
proc htmlRightBrace {} {
global electricBraces
set old $electricBraces
if {![htmlIsInContainer SCRIPT] && ![htmlIsInContainer STYLE]} {
set electricBraces 0
}
catch {bind::RightBrace}
set electricBraces $old
}
}
if {[info exists cssModeIsLoaded] && $htmlVersion != $cssVersion} {
alertnote "Warning: The versions of HTML mode and CSS mode may not be compatible.\
Always install new versions of HTML mode and CSS mode simultaneously."